package com.liang.controller;

import com.liang.common.AutoResult;
import com.liang.common.Result;
import com.liang.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liangben
 * @date 13/4/2022 12:08:07
 */
@Api(tags = "用户管理")
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @ApiOperation("查询所有")
    @GetMapping("/list")
    public Result getUserList(){
        return Result.buildSuccessData(userService.list());
    }
}
